const path = require('path')
const cwd = process.cwd()
const webpack = require('webpack')
const getEntry = require('./getEntry.js')


module.exports = function (entryList){
    var chunksList = Object.keys(entryList)
    return new webpack.optimize.CommonsChunkPlugin({
        name: 'vendors',
        chunks: chunksList,
        minChunks: chunksList.length
    })
}